/**
 * @param {string} paragraph
 * @param {string[]} banned
 * @return {string}
 */
 var mostCommonWord = function(paragraph, banned) {
  let m = new Map();
  banned.forEach(b => m.set(b, -Infinity));
  m.set("", -Infinity);
  paragraph.replace(/[`~!@#$^&*()=|{}':;',\\\[\]\.<>\/?~！@#￥……&*（）——|{}【】'；：""'。，、？]/g, ' ').split(' ').forEach(w => m.set(w.toLocaleLowerCase(), (m.get(w.toLocaleLowerCase()) || 0) + 1));
  // console.log(m);
  return [...m.entries()].sort((a, b) => b[1] - a[1])[0][0];
};